<!DOCTYPE html>
<html>

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>vue 08</title>
    <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
</head>

<body>
    <div id="app">
        <div v-if="type === 'A'">A</div>
        <div v-else-if="type === 'B'">B</div>
        <div v-else> Not A|B </div>
        <H1 v-show="ok">Head</H1>
    </div>
    <script text="text/javascript">
        var vm = new Vue({
            el: '#app',
            data: {
                type: 'B',
                ok: false,
            }
        });
        setTimeout(() => {
            vm.ok = true;
            vm.type = 'C';
        }, 2000);
    </script>
</body>